-- MOLAgent
-- Created by chengb Jun/20/2016
-- MOL支付代理

module("MOLAgent", package.seeall);

function init()
    cclog("MOL init.");
end

----------------------
-- mycard购买商品
-- @param sku 商品库存标识
function buyPurchase(sku, price)
    local serverId = getCurrentServerId();
    local account  = getGaming3rdAccount() or "empty3rdAccount";
    local platform = PUBLISH_PLATFORM;
    
    local currencyName = "pt";
    local rate = FormulaM.invoke("CURRENCY_TO_PT_RATE", "USD"); -- 美金与pt的兑换比率
    
    callJavaFunc("buyPurchaseViaMOL", {sku, account, serverId, platform, currencyName, rate,},
        "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;F)V");
end



